package com.wicket.okrcalc.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.wicket.okrcalc.biz.service.InterfaceModeService;
import com.wicket.okrcalc.biz.service.dto.req.*;
import com.wicket.okrcalc.biz.service.dto.res.*;
import com.wicket.okrcalc.common.ro.OkrResult;
import com.wicket.okrcalc.common.util.CommonFunctionHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/calc/interfaceMode/")
public class InterfaceModeController {

  @Autowired
  InterfaceModeService interfaceModeService;
/**
   * D4-获取内存中业务字段(公共)
   */
    @PostMapping("obtainGetPublicFieldCacheCom")
    public OkrResult<ObtainGetPublicFieldCacheComRespDto> obtainGetPublicFieldCacheCom(@RequestBody @Validated ObtainGetPublicFieldCacheComReqDto reqDTO){
    return OkrResult.success(interfaceModeService.obtainGetPublicFieldCacheCom(reqDTO));
    }
/**
   * D4-执行业务应用业务字段推送内存(公共)
   */
    @PostMapping("implementBizBusinessFieldPushMemoryCom")
    public OkrResult<ImplementBizBusinessFieldPushMemoryComRespDto> implementBizBusinessFieldPushMemoryCom(@RequestBody @Validated ImplementBizBusinessFieldPushMemoryComReqDto reqDTO){
    return OkrResult.success(interfaceModeService.implementBizBusinessFieldPushMemoryCom(reqDTO));
    }
/**
   * D4-计算两个数值相乘服务(公共)
   */
    @PostMapping("calculateMultiplyTwoValuesCom")
    public OkrResult<CalculateMultiplyTwoValuesComRespDto> calculateMultiplyTwoValuesCom(@RequestBody @Validated CalculateMultiplyTwoValuesComReqDto reqDTO){
    return OkrResult.success(interfaceModeService.calculateMultiplyTwoValuesCom(reqDTO));
    }
/**
   * D4-计算数据集最大小值记录(公共)
   */
    @PostMapping("calculateDataBigMiniRecordComNew")
    public OkrResult<CalculateDataBigMiniRecordComNewRespDto> calculateDataBigMiniRecordComNew(@RequestBody @Validated CalculateDataBigMiniRecordComNewReqDto reqDTO){
    return OkrResult.success(interfaceModeService.calculateDataBigMiniRecordComNew(reqDTO));
    }
/**
   * D4大屏接收字段入参(公共)
   */
    @PostMapping("implementAcceptFieldCom")
    public OkrResult<ImplementAcceptFieldComRespDto> implementAcceptFieldCom(@RequestBody @Validated ImplementAcceptFieldComReqDto reqDTO){
    return OkrResult.success(interfaceModeService.implementAcceptFieldCom(reqDTO));
    }
/**
   * D4新增内存业务数据(公共)
   */
    @PostMapping("addCalcMemoryBusinessDataCom")
    public OkrResult<AddCalcMemoryBusinessDataComRespDto> addCalcMemoryBusinessDataCom(@RequestBody @Validated AddCalcMemoryBusinessDataComReqDto reqDTO){
    return OkrResult.success(interfaceModeService.addCalcMemoryBusinessDataCom(reqDTO));
    }
/**
   * D4查询内存业务数据详情(公共)
   */
    @PostMapping("queryClacMemoryBusinessDataDetailCom")
    public OkrResult<QueryClacMemoryBusinessDataDetailComRespDto> queryClacMemoryBusinessDataDetailCom(@RequestBody @Validated QueryClacMemoryBusinessDataDetailComReqDto reqDTO){
    return OkrResult.success(interfaceModeService.queryClacMemoryBusinessDataDetailCom(reqDTO));
    }

}
